/*
 * Copyright (c) 2005, 2014 vacoor
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 */
Ext.define('Nothing.store.Trees', {
	extend: 'Ext.data.TreeStore',

	model: 'Nothing.model.Module',

	// defaultRootProperty: "data",  // 其实是这个在起作用
	defaultRootId: '-1',
	// nodeParam: 'p',


	/*
	 proxy: {
	 type: 'ajax',
	 url: 'resource/menu'
	 },

	 // tree id 一定要唯一否则..,
	 root: {
	 //nodeType: 'async',
	 name: 'hehe',
	 // children: [] root 如果配置则表示无子, 而对于服务器端返回的，则必须定义leaf false
	 expanded: true
	 }
	 */
	root: {
		text: 'root',
		expanded: true,
		children: [
			{
				text: "系统管理",
				expanded: true,
				children: [
					{ id: "101", text: "模块管理", leaf: true, controller: 'Nothing.controller.Modules', xtype: 'moduleMgt' },
					{ id: "102", text: "用户管理", leaf: true, controller: 'Nothing.controller.Users', xtype: 'userMgt' },
					{ id: "103", text: "角色管理", leaf: true, controller: 'Nothing.controller.Roles', xtype: 'roleMgt'},
					{ id: "104", text: "权限管理", leaf: true},
				]
			}
		]
	}
});
